import React, { Component } from 'react';
import './Mine.scss'
import Coll from '../../component/Coll'
import Myorder from '../../component/Myorder';
import Center from '../../component/Center';
import { Avatar } from 'antd-mobile'
class Mine extends Component {
    render() {
        return (
            <div>
                {
                    localStorage.getItem("token") ? (<div className="my" >
                        <Avatar src={JSON.parse(localStorage.getItem("userinfo")).avatarUrl} />
                        <div className='name'>wj1usubhybhbahq</div>
                    </div>) :
                        <div className="my" style={{ backgroundImage: ' url()' }}>
                            <Avatar src='' />
                            <div className='name' onClick={() => { this.props.history.push('/login') }} style={{ color: 'black' }}>点击登录</div>
                        </div>
                }

                <div className="banner">
                    <Coll />
                    <Myorder />
                    <Center />
                </div>
            </div>
        );
    }
}

export default Mine;